<template>
  <div>
  <div>
    <el-row>
      <el-col>
        <el-form ref="form" label-width="150px" style="width:400px;text-align:center">
          <el-form-item label="输入身份证号" ><el-input v-model="cid" placeholder="输入身份证"></el-input></el-form-item>
          <el-form-item label="输入房间号" ><el-input v-model="rid" placeholder="输入房间号"></el-input></el-form-item>
          <el-button type="primary" @click="toGet()">按条件查询订单</el-button>
        </el-form>
      </el-col>
    </el-row>

  </div>
    <el-descriptions title="用户信息">
      <el-descriptions-item label="订单编号">{{orderInfo.oid}}</el-descriptions-item>
      <el-descriptions-item label="身份证号">{{orderInfo.cid}}</el-descriptions-item>
      <el-descriptions-item label="房间号">{{orderInfo.rid}}</el-descriptions-item>
      <el-desccusInfoptions-item label="入住时间">{{orderInfo.starttime}}</el-desccusInfoptions-item>
      <el-descriptions-item label="截止时间">{{orderInfo.endtime}}</el-descriptions-item>
      <el-descriptions-item label="离开时间">{{orderInfo.realtime}}</el-descriptions-item>
      <el-descriptions-item label="实际付款">{{orderInfo.realprice}}</el-descriptions-item>
      <el-descriptions-item label="订单备注">{{orderInfo.remark}}</el-descriptions-item>
      <el-descriptions-item label="订单状态"><el-tag>
        {{orderInfo.status==0?'完成':'进行中'}}</el-tag></el-descriptions-item>
      <br>
    </el-descriptions>


  </div>
</template>

<script>
import instance from "@/untils";

export default {
  name: "getBycon",
  data(){
    return{
      cid:'',
      rid:'',
      orderInfo:{}
    }
  },
  methods:{
    toGet(){
        this.orderInfo={}
      instance.get('/order/getByCR/'+this.rid+'/'+this.cid).then(res=>{
        console.log(res.data.data);
        this.orderInfo=res.data.data;

      })
    }
  }
}
</script>

<style scoped>

</style>